package com.lnking.lnkingplace.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.lnking.lnkingplace.model.entity.PersonalCheckInfo;
import com.lnking.lnkingplace.mapper.PersonalCheckInfoMapper;
import com.lnking.lnkingplace.service.IPersonalCheckInfoService;
import com.lnking.starter.mybatis.service.impl.CustomServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangqt
 * @since 2022-11-09
 */
@Service
@DS("test")
public class PersonalCheckInfoServiceImpl extends CustomServiceImpl<PersonalCheckInfoMapper, PersonalCheckInfo> implements IPersonalCheckInfoService {

    @Override
    public void setX() {
        // 找出所有小写x的数据写入X
        List<PersonalCheckInfo> find = getBaseMapper().findx();
        if(find!=null){
            for (PersonalCheckInfo personalCheckInfo : find) {

                getBaseMapper().set(personalCheckInfo.getIdCardNo(),personalCheckInfo.getIdCardNo().toUpperCase());
            }
        }
    }
}
